package com.specificgroup.jira.plugin.acpro;

import org.apache.commons.io.FileUtils;

import java.io.File;

import com.specificgroup.jira.plugin.acpro.util.HttpUtil;

/**
 * @author Ivan Holub
 */
public class Main {

    public static void main(String [] args) throws Exception {
        File root = new File("D:\\work\\acpro2jira\\jira-acpro-plugin\\jira-acpro-plugin\\acproxml");
//        File fileIn = new File(root, "post.xml");
        File fileIn = new File(root, "post_links.xml");
        String request = FileUtils.readFileToString(fileIn);
        File fileOut = new File(root, "response.xml");
        String response = HttpUtil.post(Constants.ACPRO_POST_URL, request);
        FileUtils.writeStringToFile(fileOut, response, "UTF-8");
    }

}
